package bancodequestoes;


import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Access;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.AccessType;
import com.powerlogic.jcompany.commons.config.stereotypes.SPlcEntity;
import javax.persistence.Entity;
/**
 * Classe Concreta gerada a partir do assistente
 */
@SPlcEntity
@Entity
@Table(name="QUESTAO")
@SequenceGenerator(name="SE_QUESTAO", sequenceName="SE_QUESTAO")
@Access(AccessType.FIELD)

@NamedQueries({
	@NamedQuery( name="QuestaoEntity.queryMan", 
			    query="from QuestaoEntity"),
	@NamedQuery( name="QuestaoEntity.querySel", 
	            query="select id as id, " +
	            	  "banca as banca, " +
	            	  "disciplina as disciplina, " +
	            	  "assuntos as assuntos, " +
	            	  "nivel as nivel, " +
	            	  "ano as ano, " +
	            	  "orgao as orgao, " +
	            	  "cargo as cargo, " +
	            	  "area as area, " +
	            	  "enunciado as enunciado " +	            	  
	            	  "from QuestaoEntity " +
	            	  "order by id asc"),
	@NamedQuery( name="QuestaoEntity.querySelLookup", 
				query="select id as id, " +
						     "enunciado as enunciado " +
					  "from QuestaoEntity " +
					  "where id = ? " +
					  "order by id asc")
})
public class QuestaoEntity extends Questao {

	private static final long serialVersionUID = 1L;
 	
    /*
     * Construtor padrao
     */
    public QuestaoEntity() {
    }
	@Override
	public String toString() {
		//return getEnunciado();
		return getId() + ": " + getAssuntos();
	}

}
